]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
osdMonitorLabeler: avoid tweening the labels
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 27 Jun 2015 05:05:58 +0000 (22:05 -0700)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 29 Jun 2015 21:57:03 +0000 (14:57 -0700)
The control center will call this method when the configuration dialog
for a display opens/closes, which will cause the same labels to quickly
fade out and in again, looking like it's flickering.

This commit fixes the issue by removing the tweens altogether.

https://bugzilla.gnome.org/show_bug.cgi?id=751599

js/ui/osdMonitorLabeler.js

index 9d519f5010e7bd3571ce7bf83aa509c29b0ec063..90682bdf0302ec775b5321fce8d7879bc020ef5e 100644 (file)
@@ -15,8 +15,7 @@ const OsdMonitorLabel = new Lang.Class({
     Name: 'OsdMonitorLabel',
 
     _init: function(monitor, label) {
-        this._actor = new St.Widget({ opacity: 0,
-                                      x_expand: true,
+        this._actor = new St.Widget({ x_expand: true,
                                       y_expand: true });
 
         this._monitor = monitor;
@@ -34,10 +33,6 @@ const OsdMonitorLabel = new Lang.Class({
         this._position();
 
         Meta.disable_unredirect_for_screen(global.screen);
-        Tweener.addTween(this._actor,
-                         { opacity: 255,
-                           time: FADE_TIME,
-                           transition: 'easeOutQuad' });
     },
 
     _position: function() {
@@ -52,15 +47,8 @@ const OsdMonitorLabel = new Lang.Class({
     },
 
     destroy: function() {
-        Tweener.addTween(this._actor,
-                         { opacity: 0,
-                           time: FADE_TIME,
-                           transition: 'easeOutQuad',
-                           onComplete: Lang.bind(this, function() {
-                               this._actor.destroy();
-                               Meta.enable_unredirect_for_screen(global.screen);
-                           })
-                         });
+        this._actor.destroy();
+        Meta.enable_unredirect_for_screen(global.screen);
     }
 });